<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Profil</title>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <link rel="stylesheet" type="text/css" href="default.css" />
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="scripts.js"></script>

    </head>
    <body>
        <div id="upbg"></div>
        <div id="outer">

            <?php
            include 'header.php';
            include 'login.php';
            include 'menu.php';
            ?>
            <div id="content">

                <?php
                include_once 'connectBDD.php';
                $result = mysql_query("SELECT * FROM user where login ='" . $_GET['login'] . "'");

                while ($row = mysql_fetch_assoc($result)) {
                    echo "
                        <div id='loginTitre'>" . $_GET['login'];
                    if(isset($_SESSION['login'])){
                       echo"<a href=\"javascript:ouvrirFenetre('nouveauMessage.php?login=".$_GET['login']."')\")>
                                <span id='writeMsgIcon'><img style='float:right;' src='images/Write-48.png'></span>
                                <span id='label'>Envoyer un message</span>
                            </a>";
                     }
                   echo"</div>
                        <div id='avatar_ReadOnly'>
                            <img src='" . $row['avatar_path'] . "' height='300px' width='290px'/>
                        </div>
                        
                        <div id='blockInfoPers'>
                        <div id='infoPers_gauche_ReadOnly'>
                            <div class='sousTitreInfo'>Nom</div>
                            <div id='infoNom'>" . $row['last_name'] . "</div>
                            
                            <div class='sousTitreInfo'>Prenom</div>
                            <div id='infoPrenom'>" . $row['first_name'] . "</div>
                            
                            <div class='sousTitreInfo'>Date de naissance</div>
                            <div id='infoDateNaiss'>" . date_format(new DateTime($row['birthdate']), 'd-m-Y') . "</div>
                            
                            <div class='sousTitreInfo'>Mail</div>
                            <div id='infoMail'>" . $row['mail'] . "</div>
                           
                        </div>
                        ";
                }

                mysql_free_result($result);
                ?>
            </div>
            <?php
                include 'footer.php';
            ?>
        </div>

    </body>
</html>


